export Video
Exports a design block as a video file of the given mime type. Note: The export will run across multiple iterations of the update loop. In each iteration a frame is scheduled for encoding. Note: The export happens in a background thread and the Engine instance in the onPreExport lambda is a separate instance and is alive until the suspending function resumes. Use this lambda to configure the background engine for export. If uriResolver is provided it will be set on the background engine before the exported scene is loaded and once more after onPreExport is invoked (so it takes precedence if onPreExport also sets a resolver).
Return
the exported video as a file in filesDir. Note that you are responsible for deleting the file after it is used.
the exported data.
Parameters
the design block to export. Currently, only page blocks are supported.
the time offset in seconds of the page's timeline from which the video will start.
the duration in seconds of the final video.
the mime type of the output video file.
a callback that reports on the progress of the export. It informs the receiver of the number of frames rendered by the engine, the number of encoded frames, and the total number of frames to encode.
the options used for the export of the block.
the lambda to configure the engine before export. This lambda is called on a background thread, and the Engine parameter of this lambda is a separate engine instance running in that background thread.
optional async resolution function that accepts both relative and absolute uri and returns an absolute uri.
Exports multiple design blocks as video files of the given mime type. Videos are exported sequentially, with progress reported for each video. This method is more memory efficient than calling exportVideo repeatedly for multiple blocks as it reuses a single worker engine for all exports. Note: The export will run across multiple iterations of the update loop. In each iteration a frame is scheduled for encoding. Note: The export happens in a background thread and the Engine instance in the onPreExport lambda is a separate instance and is alive until the suspending function resumes. Use this lambda to configure the background engine for export. If uriResolver is provided it will be set on the background engine before the exported scene is loaded and once more after onPreExport is invoked (so it takes precedence if onPreExport also sets a resolver).
Return
the exported video data for each block, in the same order as the input blocks.
Parameters
the design blocks to export. Currently, only page blocks are supported.
the time offset in seconds of each page's timeline from which the video will start.
the duration in seconds of each final video.
the mime type of the output video files.
a callback that reports on the progress of each export. It informs the receiver of the number of frames rendered by the engine, the number of encoded frames, and the total number of frames to encode.
the options used for the export of each block.
the lambda to configure the engine before export. This lambda is called on a background thread, and the Engine parameter of this lambda is a separate engine instance running in that background thread.
optional async resolution function that accepts both relative and absolute uri and returns an absolute uri.